// import { createApp } from 'vue';
// import App from '@/App.vue';
// const app = createApp(App);
// const requireComponent = require.context("./components", false,/\.vue$/);
// requireComponent.keys().forEach((fileName) => {
//     const componentConfig = requireComponent(fileName);
//     const componentName = fileName.split('/').pop().replace(/\.\w+$/, '');
//     app.component(componentName.charAt(0).toUpperCase() + componentName.slice(1), componentConfig.default || componentConfig);
// });
// app.mount('#app');

/*
 **全局注册组件
 ** 放在components/global文件夹下
 */
// import { defineAsyncComponent } from 'vue';
// const components = import.meta.glob('./components/*.vue'); // 异步方式
// export default function install(app) {
//   for (const [key, value] of Object.entries(components)) {
//     const name = key.slice(key.lastIndexOf('/') + 1, key.lastIndexOf('.'));
//     app.component(name.charAt(0).toUpperCase() + name.slice(1), defineAsyncComponent(value));
//   }
// }


